﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:rx="clr-namespace:Songhay.Silverlight.Controls">
    <Style TargetType="rx:AnalogDigit">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="rx:AnalogDigit">
                    <Viewbox x:Name="LayoutRoot" Stretch="Uniform">
                        <Canvas Width="30" Height="50">
                            <Canvas.Clip>
                                <RectangleGeometry Rect="0,0,30,50" />
                            </Canvas.Clip>
                            <Canvas.Resources>
                                <Style TargetType="Path">
                                    <Setter Property="Canvas.Left" Value="0" />
                                    <Setter Property="Height" Value="50" />
                                    <Setter Property="Stretch" Value="Fill" />
                                    <Setter Property="Width" Value="30" />
                                </Style>
                            </Canvas.Resources>
                            <Canvas x:Name="DigitStrip" Canvas.Top="{TemplateBinding InnerCanvasTopPosition}"
                                Width="30" Height="510">
                                <!--FUNKYKB: I could not share Fill="{TemplateBinding Fill}" in a style; Blend threw a value-not-in-range Exception. -->
                                <Path x:Name="Path0" Canvas.Top="0" Fill="{TemplateBinding Fill}" Data="F1 M 28.0231,25.8767L 29.3661,27.2676L 29.3661,46.801C 28.9184,48.6636 27.7992,49.8268 26.0086,50.2904L 23.9941,44.7146L 23.9941,30.0615L 28.0231,25.8767 Z M 24.6656,50.0865L 3.4894,50.0865C 1.62679,49.6389 0.463654,48.5198 0,46.7291L 5.57584,44.7146L 22.5432,44.7146L 24.6656,50.0865 Z M 0.203846,45.386L 0.203846,27.2437L 1.54684,25.8527L 5.57584,30.0376L 5.57584,43.2877L 0.203846,45.386 Z M 22.5312,5.57581L 5.57584,5.57581L 0.203846,3.56134C 0.6675,1.77063 1.83463,0.651489 3.70523,0.203857L 24.6656,0.203857L 22.5312,5.57581 Z M 5.57584,7.00275L 5.57584,20.2528L 1.54684,24.4377L 0.203846,23.0468L 0.203846,4.9043L 5.57584,7.00275 Z M 23.9941,20.2289L 23.9941,5.57581L 26.0086,0C 27.7992,0.463623 28.9184,1.62677 29.3661,3.48938L 29.3661,23.0228L 28.0231,24.4137L 23.9941,20.2289 Z "/>
                                <Path x:Name="Path1" Canvas.Left="24" Canvas.Top="51" Fill="{TemplateBinding Fill}" Width="5" Data="F1 M 28.0231,79.3927L 29.3661,80.7837L 29.3661,100.317C 28.9184,102.18 27.7992,103.343 26.0086,103.806L 23.9941,98.2306L 23.9941,83.5775L 28.0231,79.3927 Z M 23.9941,74.1526L 23.9941,59.4996L 26.0086,53.9237C 27.7992,54.3873 28.9184,55.5505 29.3661,57.4131L 29.3661,76.9465L 28.0231,78.3375L 23.9941,74.1526 Z "/>
                                <Path x:Name="Path2" Canvas.Top="102" Fill="{TemplateBinding Fill}" Data="F1 M 23.9941,129.899L 26.788,132.585L 23.9941,135.271L 5.57584,135.271L 2.78192,132.585L 5.57584,129.899L 23.9941,129.899 Z M 26.6801,157.526L 3.4894,157.526C 1.62679,157.079 0.463654,155.959 0,154.169L 5.57584,152.154L 24.5697,152.154L 26.6801,157.526 Z M 0.203846,152.826L 0.203846,134.683L 1.54684,133.292L 5.57584,137.477L 5.57584,150.727L 0.203846,152.826 Z M 22.5312,113.016L 5.57584,113.016L 0.203846,111.001C 0.6675,109.21 1.83463,108.091 3.70523,107.644L 24.6656,107.644L 22.5312,113.016 Z M 23.9941,127.669L 23.9941,113.016L 26.0086,107.44C 27.7992,107.903 28.9184,109.067 29.3661,110.929L 29.3661,130.463L 28.0231,131.854L 23.9941,127.669 Z "/>
                                <Path x:Name="Path3" Canvas.Top="153" Fill="{TemplateBinding Fill}" Data="F1 M 23.9941,183.619L 26.788,186.305L 23.9941,188.991L 5.85163,188.991L 3.05772,186.305L 5.85163,183.619L 23.9941,183.619 Z M 28.0231,187.036L 29.3661,188.427L 29.3661,207.961C 28.9184,209.823 27.7992,210.986 26.0086,211.45L 23.9941,205.874L 23.9941,191.221L 28.0231,187.036 Z M 24.6656,211.246L 3.74121,211.246C 1.8786,210.799 0.715466,209.679 0.251812,207.889L 5.82765,205.874L 22.5791,205.874L 24.6656,211.246 Z M 22.5791,166.735L 5.89959,166.735L 0.323757,164.721C 0.787411,162.93 1.94654,161.811 3.80116,161.363L 24.6656,161.363L 22.5791,166.735 Z M 23.9941,181.388L 23.9941,166.735L 26.0086,161.16C 27.7992,161.623 28.9184,162.786 29.3661,164.649L 29.3661,184.182L 28.0231,185.573L 23.9941,181.388 Z "/>
                                <Path x:Name="Path4" Canvas.Top="204" Fill="{TemplateBinding Fill}" Data="F1 M 23.9941,237.339L 26.788,240.025L 23.9941,242.711L 5.57584,242.711L 2.78192,240.025L 5.57584,237.339L 23.9941,237.339 Z M 28.0231,240.552L 29.3661,241.943L 29.3661,261.477C 28.9184,263.339 27.7992,264.502 26.0086,264.966L 23.9941,259.39L 23.9941,244.737L 28.0231,240.552 Z M 5.57584,219.94L 5.57584,235.288L 1.54684,239.473L 0.203846,238.082L 0.203846,217.853L 5.57584,219.94 Z M 23.9941,235.312L 23.9941,220.659L 26.0086,215.083C 27.7992,215.547 28.9184,216.71 29.3661,218.573L 29.3661,238.106L 28.0231,239.497L 23.9941,235.312 Z "/>
                                <Path x:Name="Path5" Canvas.Top="255" Fill="{TemplateBinding Fill}" Data="F1 M 23.9941,291.059L 26.788,293.745L 23.9941,296.431L 5.57584,296.431L 2.78192,293.745L 5.57584,291.059L 23.9941,291.059 Z M 28.0231,294.476L 29.3661,295.867L 29.3661,315.4C 28.9184,317.263 27.7992,318.426 26.0086,318.89L 23.9941,313.314L 23.9941,298.661L 28.0231,294.476 Z M 24.6656,318.686L 3.69324,318.686C 1.83063,318.238 0.6675,317.119 0.203846,315.328L 5.57584,313.314L 22.5432,313.314L 24.6656,318.686 Z M 24.5577,274.175L 5.57584,274.175L 0.203846,272.161C 0.6675,270.37 1.83063,269.251 3.69324,268.803L 26.6801,268.803L 24.5577,274.175 Z M 5.57584,275.602L 5.57584,288.852L 1.54684,293.037L 0.203846,291.646L 0.203846,273.504L 5.57584,275.602 Z "/>
                                <Path x:Name="Path6" Canvas.Top="306" Fill="{TemplateBinding Fill}" Data="F1 M 23.9941,344.779L 26.788,347.464L 23.9941,350.15L 5.57584,350.15L 2.78192,347.464L 5.57584,344.779L 23.9941,344.779 Z M 28.0231,348.196L 29.3661,349.587L 29.3661,369.12C 28.9184,370.983 27.7992,372.146 26.0086,372.61L 23.9941,367.034L 23.9941,352.381L 28.0231,348.196 Z M 24.6656,372.406L 3.4894,372.406C 1.62679,371.958 0.463654,370.839 0,369.048L 5.57584,367.034L 22.5432,367.034L 24.6656,372.406 Z M 0.203846,367.705L 0.203846,349.563L 1.54684,348.172L 5.57584,352.357L 5.57584,365.607L 0.203846,367.705 Z M 24.5577,327.895L 5.57584,327.895L 0.203846,325.881C 0.6675,324.09 1.83063,322.971 3.69324,322.523L 26.6801,322.523L 24.5577,327.895 Z M 5.57584,329.322L 5.57584,342.572L 1.54684,346.757L 0.203846,345.366L 0.203846,327.224L 5.57584,329.322 Z "/>
                                <Path x:Name="Path7" Canvas.Top="357" Fill="{TemplateBinding Fill}" Data="F1 M 28.0231,401.712L 29.3661,403.103L 29.3661,422.636C 28.9184,424.499 27.7992,425.662 26.0086,426.126L 23.9941,420.55L 23.9941,405.897L 28.0231,401.712 Z M 22.5312,381.615L 5.57584,381.615L 0.203846,379.6C 0.6675,377.81 1.83463,376.691 3.70523,376.243L 24.6656,376.243L 22.5312,381.615 Z M 5.57584,383.042L 5.57584,396.292L 1.54684,400.477L 0.203846,399.086L 0.203846,380.943L 5.57584,383.042 Z M 23.9941,396.268L 23.9941,381.615L 26.0086,376.039C 27.7992,376.503 28.9184,377.666 29.3661,379.529L 29.3661,399.062L 28.0231,400.453L 23.9941,396.268 Z "/>
                                <Path x:Name="Path8" Canvas.Top="408" Fill="{TemplateBinding Fill}" Data="F1 M 23.9941,452.218L 26.788,454.904L 23.9941,457.59L 5.57584,457.59L 2.78192,454.904L 5.57584,452.218L 23.9941,452.218 Z M 28.0231,455.636L 29.3661,457.027L 29.3661,476.56C 28.9184,478.423 27.7992,479.586 26.0086,480.049L 23.9941,474.474L 23.9941,459.821L 28.0231,455.636 Z M 24.6656,479.846L 3.4894,479.846C 1.62679,479.398 0.463654,478.279 0,476.488L 5.57584,474.474L 22.5432,474.474L 24.6656,479.846 Z M 0.203846,475.145L 0.203846,457.003L 1.54684,455.612L 5.57584,459.797L 5.57584,473.047L 0.203846,475.145 Z M 22.5312,435.335L 5.57584,435.335L 0.203846,433.32C 0.6675,431.53 1.83463,430.411 3.70523,429.963L 24.6656,429.963L 22.5312,435.335 Z M 5.57584,436.762L 5.57584,450.012L 1.54684,454.197L 0.203846,452.806L 0.203846,434.663L 5.57584,436.762 Z M 23.9941,449.988L 23.9941,435.335L 26.0086,429.759C 27.7992,430.223 28.9184,431.386 29.3661,433.248L 29.3661,452.782L 28.0231,454.173L 23.9941,449.988 Z "/>
                                <Path x:Name="Path9" Canvas.Top="459" Fill="{TemplateBinding Fill}" Data="F1 M 23.9941,505.938L 26.788,508.624L 23.9941,511.31L 5.57584,511.31L 2.78192,508.624L 5.57584,505.938L 23.9941,505.938 Z M 28.0231,509.356L 29.3661,510.747L 29.3661,530.28C 28.9184,532.143 27.7992,533.306 26.0086,533.769L 23.9941,528.193L 23.9941,513.54L 28.0231,509.356 Z M 24.6656,533.565L 3.69324,533.565C 1.83063,533.118 0.6675,531.999 0.203846,530.208L 5.57584,528.193L 22.5432,528.193L 24.6656,533.565 Z M 22.5312,489.055L 5.57584,489.055L 0.203846,487.04C 0.6675,485.25 1.83463,484.13 3.70523,483.683L 24.6656,483.683L 22.5312,489.055 Z M 5.57584,490.482L 5.57584,503.732L 1.54684,507.917L 0.203846,506.526L 0.203846,488.383L 5.57584,490.482 Z M 23.9941,503.708L 23.9941,489.055L 26.0086,483.479C 27.7992,483.943 28.9184,485.106 29.3661,486.968L 29.3661,506.502L 28.0231,507.893L 23.9941,503.708 Z "/>
                            </Canvas>
                        </Canvas>
                    </Viewbox>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
